////////////////////////////////////////////////////////////////////////////////
//                                                                            //
//                           BailterRay                                       //
//                    Pip Robbins & Zhao Zhang                                //
//                                                                            //
////////////////////////////////////////////////////////////////////////////////
class BailterRayWeaponPowerUp extends BailterRayPickupFactory
                placeable;

var BailterRayHUD MyHud;
var BailterRayPawn BP;

function SpawnCopyFor( Pawn Recipient )
{
    local BailterRayPlayerController BPC;

	if ( UTPawn(Recipient) == None )
		return;

	Recipient.MakeNoise(0.2);
	AddWeaponStrength(UTPawn(Recipient));
	BPC = BailterRayPlayerController(Recipient.Controller);
	if(BPC != none)
	{
        MyHud = BailterRayHUD(BPC.myHUD);
        MyHud.PickupTextureType = 1;
        MyHud.bShowPickupDes = true;
        setTimer(3,false,'DisableDescription') ;
	}
	super.SpawnCopyFor(Recipient);

}

function DisableDescription()
{
    if(MyHud != none)
    {
        MyHud.bShowPickupDes = false;
        //MyHud.PickupDesCounter[1]++;
    }
}

function AddWeaponStrength(UTPawn P)
{

    P.Weapon.FireInterval[0]= 0.35;
    P.Weapon.WeaponProjectiles[0] = class'BailterRay.BailterRayProj_RedRay';
    BP = BailterRayPawn(P);
    setTimer(60,false,'DisablePowerUp');
}

function DisablePowerUp()
{
    if(BP != none)
    {
        BP.Weapon.FireInterval[0]= 0.7;
        BP.Weapon.WeaponProjectiles[0] = class'BailterRay.BailterRayProj_Ray';
    }
}

defaultproperties
{
   PickupSound=SoundCue'BailterRaySoundPackages.PICKUPS.Pickup_SoundCue'
   Begin Object class=StaticMeshComponent Name=WeaponPowerUpPickUpComp
      StaticMesh=StaticMesh'BailterRayAssetPackageLevel1.Powerups.RayGunBattery'
      Scale = 1.8;
      Rotation=(Pitch=0 ,Yaw=32655, Roll=0)
   End Object
   PickupMesh=WeaponPowerUpPickUpComp
   Components(6)=WeaponPowerUpPickUpComp
   ParticleEffectsGlow=ParticleSystem'BailterRayAssetPackageLevel1.Powerups.Powerups_Spawn_Effect'

}